#define _CRT_SECURE_NO_WARNINGS

#include "Sort.h"

#define N 100000

int main()
{
	srand(time(NULL));
	int i = 0;
	int* arr = malloc(N * sizeof(DataType));
	int* arr2 = malloc(N * sizeof(DataType));
	for (i = 0; i < N; i++)
	{
		arr[i] = rand();
	}
	memcpy(arr2, arr, N * sizeof(DataType));
	printf("InsertSort:\n");
	TimeTest(InsertSort, arr, N);
	IsSorted(arr, N);

	memcpy(arr, arr2, N * sizeof(DataType));
	printf("ShellSort:\n");
	TimeTest(ShellSort, arr, N);
	IsSorted(arr, N);

	memcpy(arr, arr2, N * sizeof(DataType));
	printf("SelectSort:\n");
	TimeTest(SelectSort, arr, N);
	IsSorted(arr, N);

	memcpy(arr, arr2, N * sizeof(DataType));
	printf("HeapSort:\n");
	TimeTest(HeapSort, arr, N);
	IsSorted(arr, N);

	memcpy(arr, arr2, N * sizeof(DataType));
	printf("BubbleSort:\n");
	TimeTest(BubbleSort, arr, N);
	IsSorted(arr, N);


	return 0;
}